#include<stdio.h>
int fib(int n)
{
	int a = 1;
	int b = 1;
	int c = 1;
	while (n > 2)
	{
		a = b;
		b = c;
		c = a + b;
		n--;
	}
		return c;
}
int main()
{
	int n;
	scanf("%d", &n);
	int a = fib(n);
	printf("%d", a);
	return 0;
}